import Vue from 'vue'
import app from "./App.vue"
import VueRouter from "vue-router"
Vue.use(VueRouter)
import router from "./router.js"
import VueResource from "vue-resource"
Vue.use(VueResource)

import "./lib/mui/css/mui.css"
import "./lib/mui/css/icons-extra.css"


// //mint-ui按需导入头部
// import {Header,Button} from 'mint-ui';
// Vue.component(Header.name,Header);
// Vue.component(Button.name,Button);
// //按需导入轮播图
// import { Swipe, SwipeItem } from 'mint-ui';
// Vue.component(Swipe.name, Swipe);
// Vue.component(SwipeItem.name, SwipeItem);

// //导入懒加载
// import { Lazyload } from 'mint-ui';
// Vue.use(Lazyload);

import MintUi from "mint-ui"
Vue.use(MintUi);
import "mint-ui/lib/style.css"




//导入时间格式化插件
import moment from "moment";
//导入缩略图预览插件
import VuePreview from "vue-preview"
Vue.use(VuePreview);



Vue.http.options.root = 'http://vue.studyit.io';
Vue.http.options.emulateJSON = true;
Vue.filter('dateFormat',function(dataStr,pattern="YYYY-MM-DD HH:MM:SS"){
  return moment(dataStr).format(pattern);
})
var vm = new Vue({
  el: '#app',
  render: c => c(app),
  router
})